<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .primary {
        color: red;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <input v-bind="attrs" />
    </div>
    <script type="module">
      import { createApp } from "./vue.esm-browser.js";
      const app = createApp({
        data() {
          return {
            attrs: {
              id: "username",
              value: "jack",
              type: "text",
              class: "demo a b primary",
            },
          };
        },
      });
      app.config.errorHandler = (error) => {
        console.log(error.message);
      };
      app.mount("#app"); //挂载
    </script>
  </body>
</html>
